<template>
  <div class="pic" ref="pic">
    <slot></slot>
  </div>
</template>
<script>
export default {
  name: "",
  data() {
    return {};
  },
  inject: ["width", "height"],
  mounted() {
    console.log(this.width, this.height);
    this.$refs.pic.style.width = this.width + "px";
    this.$refs.pic.style.height = this.height + "px";
  },
  computed: {},
  methods: {},
};
</script>
<style lang='less'  scoped>
.pic {
  float: left;
  height: 100%;
}
</style>
